// ** React Imports
import { lazy } from 'react'
import { Navigate } from 'react-router-dom'

const OnlineUser = lazy(() => import('../../views/online-user'))
const DataMonitor = lazy(() => import('../../views/data-monitor'))
const ServiceMonitor = lazy(() => import('../../views/service-monitor'))
const RoleManage = lazy(() => import('../../views/role'))
const User = lazy(() => import('../../views/user'))
const Deal = lazy(() => import('../../views/home/deal'))
const DashBoard = lazy(() => import('../../views/home/dashboard'))
const MenuManage = lazy(() => import('../../views/menu'))
const Department = lazy(() => import('../../views/department'))
const Station = lazy(() => import('../../views/station'))
const Dictionary = lazy(() => import('../../views/dictionary'))
const Log = lazy(() => import('../../views/log'))
const TimeTask = lazy(() => import('../../views/time-task'))

const AppRoutes = [
  {
    element: <Department />,
    path: '/department/manage',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <Station />,
    path: '/station/manage',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <OnlineUser />,
    path: '/online/user',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <DataMonitor />,
    path: '/data/monitor',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <ServiceMonitor />,
    path: '/service/monitor',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <RoleManage />,
    path: '/role/manage',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <User />,
    path: '/user/manage',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <Deal />,
    path: '/home/deal',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <DashBoard />,
    path: '/home/dashboard',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <MenuManage />,
    path: '/menu/manage',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <Dictionary />,
    path: '/dictionary/manage',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <Log />,
    path: '/Log/manage',
    meta: {
      publicRoute: true,
    },
  },
  {
    element: <TimeTask />,
    path: '/time/task',
    meta: {
      publicRoute: true,
    },
  },
]

export default AppRoutes
